home *** CD-ROM | disk | FTP | other *** search
- SCRBIN.DOC
- 8/20/89
-
- Documentation for SCRBIN.EXE and DISPLAY.EXE
-
- SCRBIN is a program designed to allow you convert ASCII text files
- crated with your word processor to binary files that can be written
- directly to video memory. These files could be used in programs that
- you develop as help screens, data entry forms or any other
- character-based image you need to put on the screen. Accessing video
- memory is faster than using the console writing primitives provided
- by your language (printf in C, writeln in Pascal, PRINT in BASIC),
- and storing the image in a file avoid "hard-wiring" screen text in
- your code and improves reusability. The intended result is that you
- can use your word processor as a primitive screen painter.
-
- I developed this program and its companion utility, DISPLAY, for my
- own use and as an exercise in C, which I am now learning. While I
- spent quite some time debugging it, it has not been thoroughly
- tested and I cannot guarantee your results. SCRBIN and DISPLAY are
- designed to work with monochrome, CGA and EGA video adapters, but I
- have only tested in on a Tandy 1000 TX with a CGA adapter.
-
- SCRBIN and DISPLAY are yours to use and redistribute free of charge.
- The programs are not in the public domain, however. I retain
- copyright to the code, kludges and all, and you must acknowledge my
- authorship in any copies you distribute.
-
- *************************** Packing List ****************************
-
- SCRBIN.EXE ASCII-to-binary-image converter.
- DISPLAY.EXE Image-viewing utility.
- SCRBIN10.C Source code for SCRBIN.EXE.
- DISPLAY5.C Source code for DISPLAY.EXE.
- SCRBIN.DOC This documentation text file.
- CAL.TXT Demo ASCII file depicting front panel of calculator.
- LEWPIC.TXT Demo ASCII file depicting copyright notice.
- CAL.SCR Image file created by SCRBIN using CAL.TXT and an
- attribute value of 7.
- LEWPIC.SCR Image file created by SCRBIN using LEWPIC.TXT and an
- attribute value of 110.
-
- *************************** Using SCRBIN ****************************
-
- 1. Preparing files for SCRBIN.
-
- The first step in creating screen image files for your programs is
- to "draw" the image you need on your screen with your word
- processor. You may use any word processor or text editor that will
- produce straight ASCII files. I tested SCRBIN using the line-draw
- features of Word Perfect v. 4.2.
-
- When creating the file, place the characters exactly where you wish
- them to appear on the screen at runtime. SCRBIN and DISPLAY will not
- allow you to specify screen position.
-
- When you convert the file, you will have the opportunity to specify
- an attribute for your screen image. All text must have the same
- attribute, so don't bother making text bold or reverse video.
-
- SCRBIN assumes you wish to paint the entire screen, so it is not
- terribly useful for creating partial screens, or windows. Each line
- in the text file may not have more than 80 characters, and the file
- may not have more than 25 lines. SCRBIN will truncate files that are
- longer than 25 lines. If your line length is greater than 80
- characters, SCRBIN will probably not produce satisfactory results.
- If a line contains fewer than 80 characters, SCRBIN pads the line
- out to 80 characters, using blanks with your chosen attribute. If a
- file contains fewer than 25 lines, SCRBIN does not pad the file to
- 25 lines. You should add carriage returns if you wish the bottom of
- your screen image to be blank, but with the chosen attribute.
-
- When you are finished, save your text file and exit from the word
- processor.
-
- 2. Converting text files to screen (.SCR) files.
-
- You must now use SCRBIN to convert the text file to a binary image
- file. SCRBIN simply reads your text file and saves it in another
- file along with an attribute byte. You supply the value for the
- attribute byte on the SCRBIN command line. You may specify only one
- attribute value.
-
- The SCRBIN command line takes the form
-
- SCRBIN filename.ext [attribute]
-
- where filename.ext is a normal MS-DOS filename (which may be
- qualified with drive and path designators if necessary) and
- attribute is a non-negative integer less than or equal to 255. You
- must precede the attribute parameter with a space. The attribute
- parameter is optional; if you do not supply it, SCRBIN will assume
- you want to use the normal text attribute (a value of 7).
-
- The file produced by SCRBIN is given the same base name as your text
- file. SCRBIN adds the extension SCR. If you have a file by that name
- in the current directory, it will be overwritten without warning.
-
- 3. Displaying the image (.SCR) file with DISPLAY.
-
- I have included the DISPLAY utility to allow you to view the image
- file produced by SCRBIN. To view an image file, type a command line
- of the form
-
- DISPLAY filename.ext
-
- where filename.ext is any MS-DOS filename. Note that SCRBIN produces
- image files with the extension SCR, but you may rename these files
- as you wish; DISPLAY doesn't care about the extension.
-
- DISPLAY reads the image file into a buffer, and copies the buffer to
- video memory. It automatically determines what kind of video card
- you are using. The use of the buffer is redundant, but I included
- that step because you may want to use the code to read several image
- files into buffers at the beginning of your program, and then copy
- the individual buffers to video memory later. This concentrates all
- the disk access in an initial setup stage.
-
- The image will remain on your screen until you press any key.
- DISPLAY will then clear the screen and exit.
-
-
- I hope you find this useful. Enjoy.
-
-
- Lewis Knox
- CIS 76164,144
-
-
- ----------------end-of-author's-documentation---------------
-
- Software Library Information:
-
- This disk copy provided as a service of
-
- Public (software) Library
-
- We are not the authors of this program, nor are we associated
- with the author in any way other than as a distributor of the
- program in accordance with the author's terms of distribution.
-
- Please direct shareware payments and specific questions about
- this program to the author of the program, whose name appears
- elsewhere in this documentation. If you have trouble getting
- in touch with the author, we will do whatever we can to help
- you with your questions. All programs have been tested and do
- run. To report problems, please use the form that is in the
- file PROBLEM.DOC on many of our disks or in other written for-
- mat with screen printouts, if possible. PsL cannot debug pro-
- programs over the telephone, though we can answer questions.
-
- Disks in the PsL are updated monthly, so if you did not get
- this disk directly from the PsL, you should be aware that the
- files in this set may no longer be the current versions. Also,
- if you got this disk from another vendor and are having prob-
- lems, be aware that some files may have become corrupted or
- lost by that vendor. Get a current, working disk from PsL.
-
- For a copy of the latest monthly software library newsletter
- and a list of the 2,000+ disks in the library, call or write
-
- Public (software) Library
- P.O.Box 35705 - F
- Houston, TX 77235-5705
-
- 1-800-2424-PSL
- MC/Visa/AmEx
-
- Outside of U.S. or in Texas
- or for general information,
- Call 1-713-524-6394
-
- PsL also has an outstanding
- catalog for the Macintosh.
-